﻿using DapperExtensions.Mapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nova_MOD
{
    public class TCommandsHis
    {
        public long TaskID { get; set; }

        public int TaskMode { get; set; }

        public string Tray_ID { get; set; }

        public long PosS_ID { get; set; }

        public long PosE_ID { get; set; }

        public int EquipmentS_ID { get; set; }

        public int EquipmentE_ID { get; set; }

        public int TaskStatus { get; set; }

        public int WriteToPLC { get; set; }

        public int SyncWCS { get; set; }

        public int Step { get; set; }

        public long CommandOrder { get; set; }

        public int ErrorNo { get; set; }

        public string ErrorComment { get; set; }

        public string OID { get; set; }

        public string Memo { get; set; }

        public DateTime CDT { get; set; }

        public int FLAG_1 { get; set; }

        public string User_Name { get; set; }

        public string Mat_Code { get; set; }

        public string Mat_Name { get; set; }

        public decimal? Mat_Num { get; set; }
        /// <summary>
        /// 1:完成 2：取消
        /// </summary>
        public int FinishResult { get; set; }
        /// <summary>
        /// 0：WCS自动  1：RF人工  2：WMS人工
        /// </summary>
        public int FinishMethod { get; set; }

        public DateTime FinishTime { get; set; }
    }

    public class TCommandsHisMap : ClassMapper<TCommandsHis>
    {
        public TCommandsHisMap()
        {
            const string tbName = "TCommandsHis";
            base.Table(tbName);
            Map(f => f.TaskID).Key(KeyType.Assigned);
            AutoMap();
        }
    }
}
